package com.yunhe.sms.view.teacher;

import com.yunhe.sms.mode.Teacher;
import com.yunhe.sms.mode.User;

import java.util.Scanner;

public class TeacherAdd {
    public static Teacher teacherAddUI(){
        System.out.println("********************学员信息管理系统-讲师管理-添加********************");
        Scanner sc = new Scanner(System.in);
        try {
            System.out.print("要添加讲师工号：");
            Integer id = sc.nextInt();
            System.out.print("要添加讲师姓名：");
            String name = sc.next();
            System.out.print("要添加讲师年龄：");
            String age = sc.next();
            System.out.print("要添加讲师性别：");
            String sex = sc.next();
            System.out.print("要添加讲师电话：");
            String phone = sc.next();
            return new Teacher(id,name,age,sex,phone);
        }catch (Exception e){
            System.out.println("操作不合法！");
            return teacherAddUI();
        }
    }

}

